<?php
class Funcoe extends AppModel {

	var $name = 'Funcoe';
	var $displayField = 'descricaoFuncao';
	var $validate = array(
		'setor_id' => array('notempty'),
		'cargo_id' => array('notempty'),
		'descricaoAtividade' => array('notempty'),
		'descricaoFuncao' => array(
				'ruleisUnique' => array(
					'rule' => 'isUnique',
					'message' => 'Função já cadastrada'),
				'rulenotempty' => array(
					'rule' => 'notempty',
					'message' => 'Este campo não pode ser deixado em branco'),
				)
	);

	

	//The Associations below have been created with all possible keys, those that are not needed can be removed
	var $belongsTo = array(
		'Setor' => array(
			'className' => 'Setore',
			'foreignKey' => 'setore_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		),
		'Cargo' => array(
			'className' => 'Cargo',
			'foreignKey' => 'cargo_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		)
	);

	var $hasMany = array(
		'Epil' => array(
			'className' => 'Epil',
			'foreignKey' => 'funcoe_id',
			'dependent' => false,
			'conditions' => '',
			'fields' => '',
			'order' => '',
			'limit' => '',
			'offset' => '',
			'exclusive' => '',
			'finderQuery' => '',
			'counterQuery' => ''
		),
		'Ppp' => array(
			'className' => 'Ppp',
			'foreignKey' => 'funcoe_id',
			'dependent' => false,
			'conditions' => '',
			'fields' => '',
			'order' => '',
			'limit' => '',
			'offset' => '',
			'exclusive' => '',
			'finderQuery' => '',
			'counterQuery' => ''
		)
	);

}
?>